const express = require('express');
const sign = express.Router();
const Sign = require('../model/sign')
//参加会议
sign.post('/', (req, res) => {
  Sign.updateOne({ id: req.body.id }, { $push: { list: req.body.username } }).then(result => res.send({
    code: 200, data: result
  }))
})
//查看签到数据
sign.get('/check', (req, res) => {
  Sign.findOne({ id: req.query.id }).then(result => res.send({
    code: 200, data: result
  }))
})

module.exports = sign;